/*
 * CrystalAnalysisWorker.cpp
 *
 *  Created on: Aug 10, 2012
 *      Author: koschke
 */

#include "CrystalAnalysisWorker.h"
#include "orderparameters/Localq.h"


CrystalAnalysisWorker::CrystalAnalysisWorker(double _cutOff, double _threshold) {
	cutOff = _cutOff;
	threshold = _threshold;
}

CrystalAnalysisWorker::~CrystalAnalysisWorker() {
	delete orderParameter;
}

void CrystalAnalysisWorker::EvalConfiguration(Topology* top,
		Topology* top_ref) {
	//BeadContainer::iterator ib;
	//beadList.Generate(*top, "*");

	//q6
	//LocalQ orderparameter(top, &beadList, cutOff);
	beadList.Generate(*top, "*");
	initOrderParameter<LocalQ>(top);
	orderParameter->setCutOff(cutOff);
	orderParameter->setThreshold(threshold);
	orderParameter->Calculate();
}
